package com.sun.jdk.date.mytest;

import java.time.Instant;
import java.time.LocalDate;
import java.util.Date;

public class MainTest {

    private static void test1(){

        Date date = new Date();
        System.out.println(date);
        System.out.println(date.toLocaleString());
        System.out.println(date.toGMTString());
        Instant instant = date.toInstant();

    }

    private static void test2(){

        LocalDate parse = LocalDate.parse("2022/7/24");
        System.out.println("parse = " + parse);
    }

    public static void main(String[] args) {
        test1();
        System.out.println("-----");
        test2();
    }
}
